<!-- eslint-disable vue/multi-word-component-names -->
<!-- eslint-disable vue/no-mutating-props -->
<template>
    <labelArea label="参数">
        <el-form size="small" label-suffix=" :">
            <el-form-item label="外部重置">
                <el-select v-model="data.ExternalReset">
                    <el-option v-for="im, ix in config.ExternalResetOption" :label="im[0]" :value="ix" />
                </el-select>
            </el-form-item>
            <el-form-item label="初始条件来源">
                <el-select v-model="data.InitialConditionSource">
                    <el-option v-for="im, ix in config.InitialConditionSourceOption" :label="im[0]" :value="ix" />
                </el-select>
            </el-form-item>
        </el-form>
        <el-form size="small" label-position="top" label-suffix=" :">
            <el-form-item v-if="data.InitialConditionSource == 'internal'" label="初始条件">
                <el-input v-model="data.InitialCondition" placeholder=""></el-input>
            </el-form-item>
            <el-form-item>
                <ctcheckbox v-model="data.LimitOutput">限制输出</ctcheckbox>
            </el-form-item>
            <el-form-item v-if="data.LimitOutput == 'on'" label="饱和上限">
                <el-input v-model="data.UpperSaturationLimit"></el-input>
            </el-form-item>
            <el-form-item v-if="data.LimitOutput == 'on'" label="饱和下限">
                <el-input v-model="data.LowerSaturationLimit"></el-input>
            </el-form-item>
            <el-form-item>
                <ctcheckbox v-model="data.ShowSaturationPort">显示饱和端口</ctcheckbox>
            </el-form-item>
            <el-form-item label="绝对容差">
                <el-input v-model="data.AbsoluteTolerance" placeholder=""></el-input>
            </el-form-item>
            <el-form-item>
                <ctcheckbox v-model="data.IgnoreLimit">线性化时忽略限制和重置</ctcheckbox>
            </el-form-item>
            <el-form-item>
                <ctcheckbox v-model="data.ZeroCross">启用过零检测</ctcheckbox>
            </el-form-item>
            <el-form-item>
                <template #label>
                    状态名称：(例如，‘position’)
                </template>
                <el-input v-model="data.StateName" placeholder=""></el-input>
            </el-form-item>
        </el-form>
    </labelArea>
</template>

<script setup>
const { data, config } = defineProps(['data', 'config'])

</script>


<style scoped></style>